﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using GalaSoft.MvvmLight;

namespace MSSQL.DBSync.UI.Components.MakeSnapshot
{

    /// <summary>
    /// 数据库对象概要
    /// </summary>
    public class DBObjectBriefVO : ObservableObject
    {

        public DBObjectBriefVO()
        {
            Childs = new ObservableCollection<DBChildObj>();
        }

        private string mName;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name
        {
            get => mName;
            set => Set(ref mName, value);
        }

        private string mTypeName;
        /// <summary>
        /// 类型
        /// </summary>
        public string TypeName
        {
            get => mTypeName;
            set => Set(ref mTypeName, value);
        }

        private int mCount;
        /// <summary>
        /// 记录数
        /// </summary>
        public int Count
        {
            get => mCount;
            set => Set(ref mCount, value);
        }

        private bool mIsShow;
        /// <summary>
        /// 是否显示
        /// </summary>
        public bool IsShow
        {
            get => mIsShow;
            set => Set(ref mIsShow, value);
        }


        private string mDesc;
        /// <summary>
        /// 描述信息
        /// </summary>
        public string Desc
        {
            get => mDesc;
            set => Set(ref mDesc, value);
        }

        public ObservableCollection<DBChildObj> Childs { get; set; } 

    }


    /// <summary>
    /// 子对象 
    /// </summary>
    public class DBChildObj : ObservableObject
    {
        public DBChildObj()
        {
            Childs = new ObservableCollection<DBChildObj>();
        }

        private string mName;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name
        {
            get => mName;
            set => Set(ref mName, value);
        }

        private string mTypeName;
        /// <summary>
        /// 类型
        /// </summary>
        public string TypeName
        {
            get => mTypeName;
            set => Set(ref mTypeName, value);
        }

        private string mDesc;
        /// <summary>
        /// 描述信息
        /// </summary>
        public string Desc
        {
            get => mDesc;
            set => Set(ref mDesc, value);
        }

        public ObservableCollection<DBChildObj> Childs { get; set; }
    }

}
